package com.sky.mapper;

import com.sky.annotation.AutoFill;
import com.sky.entity.ShoppingCart;
import com.sky.enumeration.OperationType;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

@Mapper
public interface ShoppingCartMapper {

    /*
    * 添加购物车数据
    * */
    @Insert("insert into shopping_cart (name, image, user_id, dish_id, setmeal_id, dish_flavor, amount, create_time,number)  " +
            "values (#{name},#{image},#{userId},#{dishId},#{setmealId},#{dishFlavor},#{amount},#{createTime},#{number}) ")
    void insert(ShoppingCart shoppingCart);

    /*
    * 查询购物车数据
    * */
    List<ShoppingCart> selectList(ShoppingCart shoppingCart);

    /*
    * 更新购物车数据
    * */
    void update(ShoppingCart cart);

    /*
    * 根据条件删除购物车信息
    * */
    void deleteById(ShoppingCart shoopingCart);
}
